import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    user: {}
  },
  actions: {},
  mutations: {
    saveUser (state, user) {
      state.user = user
    }
  },
  getters: {
    isLog (state) {
      if (state.user.memPhone != null) {
        return true
      } else {
        return false
      }
    }
  }
})
